#include<stdio.h>

int main()
{
	int n,flag,key;
	double sum=0;
	scanf("%d",&n);
	for(flag=1,key=1;key<=n;flag+=3,key++)
	{
		if(key%2==1) sum+=1.0/flag;
		else sum+=-1.0/flag;
	}
	printf("sum = %.3lf",sum);
	return 0;
}
